﻿using System.Web.Mvc;
using System.Web.Routing;

namespace Peak.Web.Controllers
{
  public class RouteRegistrar
  {
    public static void RegisterRoutesTo(RouteCollection routes)
    {
      //routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
      //routes.IgnoreRoute("{*favicon}", new { favicon = @"(.*/)?favicon.ico(/.*)?" });

      //routes.MapRoute(
      //  "Default",                                              // Route name
      //  "{controller}.aspx/{action}/{id}",                      // URL with parameters
      //  new { controller = "Account", action = "Login", id = UrlParameter.Optional }  // Parameter defaults
      //);

      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

      routes.MapRoute(
          "Default",
          "{controller}.aspx/{action}/{id}",
          new { action = "Index", id = "" }
        );

      routes.MapRoute(
        "Root",
        "",
        new { controller = "Home", action = "Index", id = "" }
      );

    }
  }
}
